package com.dragon.modules.yuegou.model.product;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.dragon.modules.yuegou.entity.product.GrouponInfoEntity;
import com.dragon.modules.yuegou.enums.product.GrouponInfoCheckStatus;
import com.dragon.modules.yuegou.enums.product.GrouponInfoReleaseType;
import com.dragon.modules.yuegou.enums.product.GrouponInfoStatus;
import com.dragon.modules.yuegou.model.merchant.Merchant;
import com.dragon.modules.yuegou.model.order.OrderItem;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 拼团活动信息表模型类
 * 
 * @author pbuilder generated
 * @date 2019-09-28 14:32:38
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class GrouponInfo extends GrouponInfoEntity {

	@ApiModelProperty("是否关注拼团活动信息")
	private boolean isFavoriteGroup;

	@ApiModelProperty("是否关注商户")
	private boolean isFavoriteMerchant;

	@ApiModelProperty("原价")
	private BigDecimal price;

	@ApiModelProperty("参与人头像")
	private List<String> participantImgs;

	@ApiModelProperty("能否参团")
	private boolean isAttend;

	@ApiModelProperty("拼团结束时间")
	private LocalDateTime theEndTime;

	@ApiModelProperty("开团id")
	private String grouponId;

	@ApiModelProperty("图片详情")
	private String imgDescription;

	@ApiModelProperty("拼团详情详情")
	private String info;

	@ApiModelProperty("使用开始时间")
	private LocalDateTime useBeginTime;

	@ApiModelProperty("使用结束时间")
	private LocalDateTime useEndTime;

	public LocalDateTime getUseBeginTime() {
		return useBeginTime;
	}

	public void setUseBeginTime(LocalDateTime useBeginTime) {
		this.useBeginTime = useBeginTime;
	}

	public LocalDateTime getUseEndTime() {
		return useEndTime;
	}

	public void setUseEndTime(LocalDateTime useEndTime) {
		this.useEndTime = useEndTime;
	}

	public String getGrouponId() {
		return grouponId;
	}

	public void setGrouponId(String grouponId) {
		this.grouponId = grouponId;
	}

	public String getImgDescription() {
		return imgDescription;
	}

	public void setImgDescription(String imgDescription) {
		this.imgDescription = imgDescription;
	}

	public String getInfo() {
		return info;
	}

	public void setInfo(String info) {
		this.info = info;
	}

	public LocalDateTime getTheEndTime() {
		return theEndTime;
	}

	public void setTheEndTime(LocalDateTime theEndTime) {
		this.theEndTime = theEndTime;
	}

	@ApiModelProperty("开始时间")
	private String beginTime;

	@ApiModelProperty("结束时间")
	private String endTime;

	@ApiModelProperty("参团id")
	private String grouponJoinId;

	public String getGrouponJoinId() {
		return grouponJoinId;
	}

	public void setGrouponJoinId(String grouponJoinId) {
		this.grouponJoinId = grouponJoinId;
	}

	public String getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(String beginTime) {
		this.beginTime = beginTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public boolean isAttend() {
		return isAttend;
	}

	public void setAttend(boolean attend) {
		isAttend = attend;
	}

	public List<String> getParticipantImgs() {
		return participantImgs;
	}

	public void setParticipantImgs(List<String> participantImgs) {
		this.participantImgs = participantImgs;
	}

	private String createdName;

	public void setCreatedName(String createdName) {
		this.createdName = createdName;
	}

	public String getCreatedName() {
		return createdName;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public boolean isFavoriteGroup() {
		return isFavoriteGroup;
	}

	public void setFavoriteGroup(boolean favoriteGroup) {
		isFavoriteGroup = favoriteGroup;
	}

	public boolean isFavoriteMerchant() {
		return isFavoriteMerchant;
	}

	public void setFavoriteMerchant(boolean favoriteMerchant) {
		isFavoriteMerchant = favoriteMerchant;
	}

	@ApiModelProperty("订单号")
	private String orderNo;

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	@ApiModelProperty("是否支付")
	private boolean isPaid;

	public boolean isPaid() {
		return isPaid;
	}

	public void setPaid(boolean paid) {
		isPaid = paid;
	}

	@ApiModelProperty("差几人成团")
	private int leftGrouponNum;

	public int getLeftGrouponNum() {
		return leftGrouponNum;
	}

	public void setLeftGrouponNum(int leftGrouponNum) {
		this.leftGrouponNum = leftGrouponNum;
	}

	@ApiModelProperty("参团列表")
	private List<GrouponJoin> grouponJoinList;

	public List<GrouponJoin> getGrouponJoinList() {
		return grouponJoinList;
	}

	public void setGrouponJoinList(List<GrouponJoin> grouponJoinList) {
		this.grouponJoinList = grouponJoinList;
	}

	@ApiModelProperty("单个订单信息")
	private OrderItem orderItem;

	public OrderItem getOrderItem() {
		return orderItem;
	}

	public void setOrderItem(OrderItem orderItem) {
		this.orderItem = orderItem;
	}

	@ApiModelProperty("参与人数")
	private Integer joinNum;

	public Integer getJoinNum() {
		return joinNum;
	}

	public void setJoinNum(Integer joinNum) {
		this.joinNum = joinNum;
	}

	@ApiModelProperty("商户信息")
	private Merchant merchant;

	@ApiModelProperty("商户信息列表")
	private List<Merchant> merchantList;

	@ApiModelProperty("商户名称")
	private String merchantNames;

	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	public List<Merchant> getMerchantList() {
		return merchantList;
	}

	public void setMerchantList(List<Merchant> merchantList) {
		this.merchantList = merchantList;
	}

	public String getMerchantNames() {
		return merchantNames;
	}

	public void setMerchantNames(String merchantNames) {
		this.merchantNames = merchantNames;
	}

	@ApiModelProperty("正在拼团列表")
	private IPage<Groupon> grouponList;

	public IPage<Groupon> getGrouponList() {
		return grouponList;
	}

	public void setGrouponList(IPage<Groupon> grouponList) {
		this.grouponList = grouponList;
	}

	public Stock getStock() {
		return stock;
	}

	public void setStock(Stock stock) {
		this.stock = stock;
	}

	@ApiModelProperty("库存")
	private Stock stock;

	public Sku getSku() {
		return sku;
	}

	public void setSku(Sku sku) {
		this.sku = sku;
	}

	private Sku sku;

	private Spu spu;

	@ApiModelProperty("商品标题")
	private String title;

	@ApiModelProperty("商户名称")
	private String merchantName;

	@ApiModelProperty("创建人")
	private String createUserName;

	/**
	 * 规格属性 JSON存储
	 */
	@ApiModelProperty("规格属性JSON存储")
	protected String attrs;

	private Integer countNum;

	/**
	 * 构造一个空拼团活动信息表模型对象
	 */
	public GrouponInfo() {
		super();
	}

	/**
	 * 依据实体对象的信息构造一个拼团活动信息表模型对象
	 * 
	 * @param entity 实体对象
	 */
	public GrouponInfo(GrouponInfoEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个拼团活动信息表模型对象
	 * 
	 * @param other 其它对象
	 */
	public GrouponInfo(GrouponInfo other) {
		super(other);
	}

	public Integer getCountNum() {
		return countNum;
	}

	public void setCountNum(Integer countNum) {
		this.countNum = countNum;
	}

	public Spu getSpu() {
		return spu;
	}

	public void setSpu(Spu spu) {
		this.spu = spu;
	}

	public String getAttrs() {
		return attrs;
	}

	public void setAttrs(String attrs) {
		this.attrs = attrs;
	}

	public String getCreateUserName() {
		return createUserName;
	}

	public void setCreateUserName(String createUserName) {
		this.createUserName = createUserName;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	@Override
	public String getId() {
		return id;
	}

	/**
	 * 设置主键ID
	 * 
	 * @param id 主键ID
	 * @return 当前对象
	 */
	public GrouponInfo id(String id) {
		this.id = id;
		return this;
	}

	@Override
	public String getName() {
		return name;
	}

	/**
	 * 设置活动名称
	 * 
	 * @param name 活动名称
	 * @return 当前对象
	 */
	public GrouponInfo name(String name) {
		this.name = name;
		return this;
	}

	@Override
	public String getBusdId() {
		return busdId;
	}

	/**
	 * 设置商圈ID
	 * 
	 * @param busdId 商圈ID
	 * @return 当前对象
	 */
	public GrouponInfo busdId(String busdId) {
		this.busdId = busdId;
		return this;
	}

	@Override
	public String getMerchantId() {
		return merchantId;
	}

	/**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
	public GrouponInfo merchantId(String merchantId) {
		this.merchantId = merchantId;
		return this;
	}

	@Override
	public GrouponInfoReleaseType getReleaseType() {
		return releaseType;
	}

	/**
	 * 设置[枚举]发布类型：0-商圈-BUSD、1-商户-MERCHANT
	 * 
	 * @param releaseType [枚举]发布类型：0-商圈-BUSD、1-商户-MERCHANT
	 * @return 当前对象
	 */
	public GrouponInfo releaseType(GrouponInfoReleaseType releaseType) {
		this.releaseType = releaseType;
		return this;
	}

	@Override
	public String getSpuId() {
		return spuId;
	}

	/**
	 * 设置
	 * 
	 * @param spuId
	 * @return 当前对象
	 */
	public GrouponInfo spuId(String spuId) {
		this.spuId = spuId;
		return this;
	}

	@Override
	public String getSkuId() {
		return skuId;
	}

	/**
	 * 设置拼团skuID
	 * 
	 * @param skuId 拼团skuID
	 * @return 当前对象
	 */
	public GrouponInfo skuId(String skuId) {
		this.skuId = skuId;
		return this;
	}

	@Override
	public String getImgs() {
		return imgs;
	}

	/**
	 * 设置活动主图片
	 * 
	 * @param imgs 活动主图片
	 * @return 当前对象
	 */
	public GrouponInfo imgs(String imgs) {
		this.imgs = imgs;
		return this;
	}

	@Override
	public BigDecimal getGrouponPrice() {
		return grouponPrice;
	}

	/**
	 * 设置拼团价
	 * 
	 * @param grouponPrice 拼团价
	 * @return 当前对象
	 */
	public GrouponInfo grouponPrice(BigDecimal grouponPrice) {
		this.grouponPrice = grouponPrice;
		return this;
	}

	@Override
	public Integer getGrouponNum() {
		return grouponNum;
	}

	/**
	 * 设置成团人数
	 * 
	 * @param grouponNum 成团人数
	 * @return 当前对象
	 */
	public GrouponInfo grouponNum(Integer grouponNum) {
		this.grouponNum = grouponNum;
		return this;
	}

	@Override
	public Integer getGrouponStock() {
		return grouponStock;
	}

	/**
	 * 设置活动库存
	 * 
	 * @param grouponStock 活动库存
	 * @return 当前对象
	 */
	public GrouponInfo grouponStock(Integer grouponStock) {
		this.grouponStock = grouponStock;
		return this;
	}

	@Override
	public Integer getMaxBuy() {
		return maxBuy;
	}

	/**
	 * 设置最大购买数量
	 * 
	 * @param maxBuy 最大购买数量
	 * @return 当前对象
	 */
	public GrouponInfo maxBuy(Integer maxBuy) {
		this.maxBuy = maxBuy;
		return this;
	}

	@Override
	public LocalDateTime getBeginDate() {
		return beginDate;
	}

	@Override
	public LocalDateTime getEndDate() {
		return endDate;
	}

	@Override
	public LocalDateTime getViewBeginTime() {
		return viewBeginTime;
	}

	@Override
	public LocalDateTime getViewEndTime() {
		return viewEndTime;
	}

	public GrouponInfo endDate(LocalDateTime endDate) {
		this.endDate = endDate;
		return this;
	}

	@Override
	public Boolean getIsOriginalPrice() {
		return isOriginalPrice;
	}

	/**
	 * 设置是否原价购买:0:否 1:是
	 * 
	 * @param isOriginalPrice 是否原价购买:0:否 1:是
	 * @return 当前对象
	 */
	public GrouponInfo isOriginalPrice(Boolean isOriginalPrice) {
		this.isOriginalPrice = isOriginalPrice;
		return this;
	}

	@Override
	public Boolean getIsChoiceness() {
		return isChoiceness;
	}

	/**
	 * 设置精选 0 :否；1：是
	 * 
	 * @param isChoiceness 精选 0 :否；1：是
	 * @return 当前对象
	 */
	public GrouponInfo isChoiceness(Boolean isChoiceness) {
		this.isChoiceness = isChoiceness;
		return this;
	}

	@Override
	public Integer getIsRecommend() {
		return isRecommend;
	}

	/**
	 * 设置是否推荐 0:不推荐 1:推荐
	 * 
	 * @param isRecommend 是否推荐 0:不推荐 1:推荐
	 * @return 当前对象
	 */
	public GrouponInfo isRecommend(Integer isRecommend) {
		this.isRecommend = isRecommend;
		return this;
	}

	@Override
	public Boolean getShowMain() {
		return showMain;
	}

	/**
	 * 设置首页展示0 :否；1：是
	 * 
	 * @param showMain 首页展示0 :否；1：是
	 * @return 当前对象
	 */
	public GrouponInfo showMain(Boolean showMain) {
		this.showMain = showMain;
		return this;
	}

	@Override
	public String getRemarks() {
		return remarks;
	}

	/**
	 * 设置使用规则
	 * 
	 * @param remarks 使用规则
	 * @return 当前对象
	 */
	public GrouponInfo remarks(String remarks) {
		this.remarks = remarks;
		return this;
	}

	@Override
	public Integer getSort() {
		return sort;
	}

	/**
	 * 设置排序
	 * 
	 * @param sort 排序
	 * @return 当前对象
	 */
	public GrouponInfo sort(Integer sort) {
		this.sort = sort;
		return this;
	}

	@Override
	public Boolean getIsExpire() {
		return isExpire;
	}

	/**
	 * 设置是否过期:0:否 1:是
	 * 
	 * @param isExpire 是否过期:0:否 1:是
	 * @return 当前对象
	 */
	public GrouponInfo isExpire(Boolean isExpire) {
		this.isExpire = isExpire;
		return this;
	}

	@Override
	public GrouponInfoCheckStatus getCheckStatus() {
		return checkStatus;
	}

	/**
	 * 设置[枚举]审核状态：0-待提交-SUBMIT、1-审核中-CHECKING、2-审核通过-THROUGH、3-审核未通过-NOTHROUGH
	 * 
	 * @param checkStatus [枚举]审核状态：0-待提交-SUBMIT、1-审核中-CHECKING、2-审核通过-THROUGH、3-审核未通过-NOTHROUGH
	 * @return 当前对象
	 */
	public GrouponInfo checkStatus(GrouponInfoCheckStatus checkStatus) {
		this.checkStatus = checkStatus;
		return this;
	}

	@Override
	public LocalDateTime getCheckTime() {
		return checkTime;
	}

	/**
	 * 设置审核时间
	 * 
	 * @param checkTime 审核时间
	 * @return 当前对象
	 */
	public GrouponInfo checkTime(LocalDateTime checkTime) {
		this.checkTime = checkTime;
		return this;
	}

	@Override
	public String getCheckReason() {
		return checkReason;
	}

	/**
	 * 设置审核备注
	 * 
	 * @param checkReason 审核备注
	 * @return 当前对象
	 */
	public GrouponInfo checkReason(String checkReason) {
		this.checkReason = checkReason;
		return this;
	}

	@Override
	public Integer getViews() {
		return views;
	}

	/**
	 * 设置浏览次数
	 * 
	 * @param views 浏览次数
	 * @return 当前对象
	 */
	public GrouponInfo views(Integer views) {
		this.views = views;
		return this;
	}

	@Override
	public Integer getShareNum() {
		return shareNum;
	}

	/**
	 * 设置分享次数
	 * 
	 * @param shareNum 分享次数
	 * @return 当前对象
	 */
	public GrouponInfo shareNum(Integer shareNum) {
		this.shareNum = shareNum;
		return this;
	}

	@Override
	public GrouponInfoStatus getStatus() {
		return status;
	}

	/**
	 * 设置[枚举]状态：0-下架-OFFLINE、1-上架-ONLINE
	 * 
	 * @param status [枚举]状态：0-下架-OFFLINE、1-上架-ONLINE
	 * @return 当前对象
	 */
	public GrouponInfo status(GrouponInfoStatus status) {
		this.status = status;
		return this;
	}

	@Override
	public String getCreatedBy() {
		return createdBy;
	}

	/**
	 * 设置创建人ID
	 * 
	 * @param createdBy 创建人ID
	 * @return 当前对象
	 */
	public GrouponInfo createdBy(String createdBy) {
		this.createdBy = createdBy;
		return this;
	}

	@Override
	public LocalDateTime getCreatedTime() {
		return createdTime;
	}

	/**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
	public GrouponInfo createdTime(LocalDateTime createdTime) {
		this.createdTime = createdTime;
		return this;
	}

	@Override
	public String getModifiedBy() {
		return modifiedBy;
	}

	/**
	 * 设置更新人ID
	 * 
	 * @param modifiedBy 更新人ID
	 * @return 当前对象
	 */
	public GrouponInfo modifiedBy(String modifiedBy) {
		this.modifiedBy = modifiedBy;
		return this;
	}

	@Override
	public LocalDateTime getModifiedTime() {
		return modifiedTime;
	}

	/**
	 * 设置更新时间
	 * 
	 * @param modifiedTime 更新时间
	 * @return 当前对象
	 */
	public GrouponInfo modifiedTime(LocalDateTime modifiedTime) {
		this.modifiedTime = modifiedTime;
		return this;
	}

	@Override
	public Boolean getDel() {
		return del;
	}

	/**
	 * 设置逻辑删除，1表示已删除,0表示未删除
	 * 
	 * @param del 逻辑删除，1表示已删除,0表示未删除
	 * @return 当前对象
	 */
	public GrouponInfo del(Boolean del) {
		this.del = del;
		return this;
	}

	@Override
	public String getDelBy() {
		return delBy;
	}

	/**
	 * 设置删除人ID
	 * 
	 * @param delBy 删除人ID
	 * @return 当前对象
	 */
	public GrouponInfo delBy(String delBy) {
		this.delBy = delBy;
		return this;
	}

	@Override
	public LocalDateTime getDelTime() {
		return delTime;
	}

	/**
	 * 设置删除时间
	 * 
	 * @param delTime 删除时间
	 * @return 当前对象
	 */
	public GrouponInfo delTime(LocalDateTime delTime) {
		this.delTime = delTime;
		return this;
	}
}
